perm filename INFO.TXT[IP,SYS]1 blob
sn#694374 filedate 1983-01-08 generic text, type C, neo UTF8
COMMENT ā VALID 00006 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Notes on the TOPS-10 implementation of IP/TCP and conversion to WAITS.
C00004 00003 Undefined globals when trying to load TOPS-10 IMP code.
C00013 00004 Analysis of the TOPS-10 code.
C00015 00005 Entry points and internal symbols.
C00026 00006 Data structures.
C00028 ENDMK
Cā;
Notes on the TOPS-10 implementation of IP/TCP and conversion to WAITS.
Files (on [IP,SYS] at SAIL):
COMDEV.MAC Monitor device-dependent code, symbols, and data.
F.MAC Sets "feature" switches for TOPS-10 system.
FTPSRV.MAC FTP server for IP/TCP. (Comment by Provan: Doesn't work at
the moment because it tries to treate the IMP as a device,
but in the new monitor, the FTPSRV connection is just a
TTY and should be treated that way.)
IMP.MAC IMP system symbol definitions.
IMPCOM.MAC IMP Command handler. (Provan: corrected for absense of ICP.
Seems to work.)
IMPHLP.MAC Text for HELP command in IMPCOM.
IMPSER.MAC IMP interrupt service, input and output UUOs handlers,
TTY routines (for telnet connections), host table handling.
IMPSUB.MAC User subroutines for host table management, ICPs, and IMP
error handling.
IPSER.MAC IP service.
MACTEN.MAC Macros and symbols for TOPS-10 style coding.
MAIL.MAC The MAIL program.
NETCON.MAC Network Control Program (NCP).
NETDEF.MAC Common definitions for network code.
NETSUB.MAC Common subroutines.
S.MAC System parameter file for TOPS-10.
TULIP.MAC Tulip. (Whatever that is. Gets searched by several files.)
TCPSER.MAC TCP service, IMPUUO handler.
Undefined globals when trying to load TOPS-10 IMP code.
I found some of these in COMDEV.MAC (all on page 78); they are marked below. It
is fairly obvious that most of COMDEV.MAC deals with things unrelated to Arpanet
service. COMDEV itself won't compile, because it tries to search the file
NETPRM, which is missing. (Perhaps, with a name like that, it contains more of
the missing symbols.)
Other comments here are from code found that references these symbols.
Reference in brackets is one of possibly several to the symbol.
CLRACT 406335 ;clear IOACT and return [IMPSER/62P]
TTFCXH 0
OUT 401270
IMPBFN 401260 (COMDEV)
GETWD1 406527
LOKSCI 407467
GET4WD 407527 ;gets a 4-word FS block [NETSUB/23P]
LDLLCP 402703 ;flag bit for local copy line [IMPSER/80P]
MITYN 403117 (COMDEV)
.C0PC 401675 ;job's PC [IMPSER/61P]
IMPBFT 407347 (COMDEV)
IMPBFS 407352 (COMDEV)
SONPJ1 406230 ;SCNSER interrupts on and skip return
ITIMPL 406574 (COMDEV)
SETDVL 406651 ;store job # and add to logical table [IMPSER/65P]
PDVTIM 406326 ;set timeout in DDB
SETNEC 402712 ;disable user TELNET echoing [IMPSER/80P]
MYSITE 403245 (COMDEV)
.CPSK0 401626
ONPOPJ 407530 ;turns PIs on and returns [TCPSER/30P]
MIMBS2 400044 (COMDEV)
TPOPJ 407403 ;POP P,T1 and return (T1=6)
CCTYO9 402555 ; [IMPSER/82P]
.CPJOB 406252
XMTIMP 402274 ;code in SCNSER to simulate interrupt [IMPSER/74P]
SAVE4 406035 ;saves registers P1-P4 (14-17)
LDPQTB 406353
ITMCNT 401465 ;get byte count [IMPSER/54P]
UPOPJ 403134 ;POP P,U and return (U=5)
ITYOFS 406310 (COMDEV)
IMPBUF 407353 (COMDEV)
ZRNGE 401660 ;some kind of range check [IMPSER/61P]
TTYXMT 402113
TTYTAB 406355
PSIIOD 401665 ;signal input done [IMPSER/17P]
JOBPD1 401636 ; [IMPSER/61P]
REGSIZ 401275 ; [IMPSER/53P]
PUTWD1 406602
GETWDU 406645
DDBLDB 406356
TTPLEN 406301
IOSNEC 402704 ; [IMPSER/80P]
ITYFST 406575 ;offset from ITY # to line # [IMPSER/93P]
SETACT 406330 ;set IOACT [IMPSER/60P]
T2POPJ 407255 ;POP P,T2 and return (T2=7)
TTFCXG 0
TTFCXF 0
SAVT 407603 ;saves registers T1-T4 (6-11)
MIMBS1 400115 (COMDEV)
TPOPJ1 407563 ;POP P,T1 then CPOPJ1
PRVBIT 406057
.CPCPN 401174 ;some CPU number [IMPSER/46P]
IMPRQF 402203 (COMDEV)
JBTLCL 401652 ; [IMPSER/59P]
SAVE1 407564 ;saves register P1 (14)
ITYTAB 403132 ;pseudo teletype 'ITY' linkage tale
RELEA6 407513 ;deassigns a device? [NETSUB/22P]
SCNPIF 0
TICSEC 407561 ;number of ticks per second [NETSUB/10P]
IMPOUT 400503
DIE 407570
SCNPIN 0
JIFSEC 405521 ; [NETSUB/23P]
ADVBFE 401522 ;advance buffer [IMPSER/58P]
PUTWDU 406653
TTYOFF 403153 ;signal disconnect [IMPSER/94P]
MNQUPT 406360
PJOBN 407461 ;ptr to job number [NETSUB/20P]
SYSUPT 405533 ;current system uptime [IMPSER/32P]
ADVBFF 401444 ;advance buffers [IMPSER/56P]
IADRCK 406216
LDBIMP 406311 ;pointer from LDB to IMP DDB [IMPSER/65P]
FPOPJ 402560 ;POP P,F and return (F=4)
THSITE 0 (COMDEV)
TIME 407251 ;time in ticks since midnight [NETSUB/10P]
TTYIMP 401751 ;give SCNSER the IMP DDB [IMPSER/65P]
T2POJ1 407167 ;POP P,T2 then CPOPJ1 (T2=7)
LDBDDB 403127 ;TTY DDB pointer [IMPSER/80P]
LDPRTC 402407 ;ptr to RTCOMP bit [IMPSER/78P]
LDRIMP 402454 ;flag bit for IMP line [IMPSER/80P]
LOKSPI 407526
IMPDWN 401243 ;turn IMP off [IMPSER/49P]
LDPLNO 406321 ;ptr to line number [IMPSER/65P]
RECIMP 402650 ; [IMPSER/71P]
IMPION 401142 ;turn on input (?) [IMPSER/12P]
UNLSPT 0
WSYNC 406333 ;wait [IMPSER/60P]
IMPIOF 400052 ;turn off input [IMPSER/12P]
CPOPJ1 407637 ;skip return
CPOPJ2 401744 ;skip 2 return
GIV4WD 407620 ;release 4-word FS block [NETSUB/25P]
LDBDCH 403112 ;TTY characteristics [IMPSER/64P]
SAVE2 407621 ;saves registers P1-P2 (14-15)
PRVJ 406457
CPOPJ 407574 ;return
PUTWRD 406172
ITYN 0 ;number of IMP ports? [COMDEV/78P]
PBUFSZ 401655 ;ptr to some buffer size [IMPSER/61P]
SETECH 402720 ;enable user TELNET echoing [IMPSER/80P]
TOTAKE 402305 ; [IMPSER/74P]
TTYFLT 0 ; [IMPSER/61P]
TTFORC 404733 ;forces a TTY command [TCPSER/12P]
TSETBO 404726 ;clears some output buffer [TCPSER/12P]
TSETBI 404725 ;clears corresponding input buffer
UNLSPI 407531
LINTAB 406303 ; [IMPSER/93P]
SONPPJ 406033 ;SCNSER interrupts on and return
IMPCHK 401050 ;check IMP hardware (skip 2 if OK, etc.) [IMPSER/14P]
SAVE3 403442 ;saves registers P1-P3 (14-16)
HDSITE 0 (COMDEV)
IMPBFE 407332 (COMDEV)
LDROSU 403111 ; [IMPSER/66P]
QUOCHK 406351
IMPN 407622 ;number of IMP DDBs [COMDEV/78P]
SETBYT 401460 ;set byte size [IMPSER/54P]
STIIOD 401711
IMPM36 407260 (COMDEV)
XMTCHR 402310 ;get a char to send [IMPSER/74P]
ASSASG 406627
TTYTTI 402017 ;get a character [IMPSER/66P]
DEYCPF 401173 ;ptr to CPU number somewhere [IMPSER/46P]
UNLSCI 407507
ADRERR 406173
HNGSTP 401545 ;type user message and stop [IMPSER/59P]
DEVSRG 406611
Analysis of the TOPS-10 code.
** IMP input
A. At interrupt level.
1. [IMPSER, p. 12-16] Message is transferred into one or more buffers
(allocated as needed). Non-data messages are handled appropriately,
otherwise, if the link number indicates an IP packet, IPIN is called.
Non-IP data messages are ignored.
2. [IPSER, p. 7-9] Message is checksummed, etc. IP options are handled
and message fragments put together. Then the appropriate routine is
called depending on the protocol (ICMPIN or TCPIN).
3. [TCPSER, p. 9- ] Checksums TCP message, handles options. Then
processes messages in the "future queue" which have already come in
and can now be processed. Sends ACK when necessary.
Entry points and internal symbols.
[* = code, D = data]
IPSER:
* IPIN - handle an incoming IP message.
D IPADDR - our site number.
* IPMAKE - get a fresh buffer and put an IP leader (in 32 bit format) into
it. then link the buffer to the beginning of the current output
stream. then send this message down to 1822 level (IMPSER) to get it
fired off.
* IPSEC - once a second code for IP. it checks for time outs in the
fragmentation reassembly chain.
* SNDNSP - send a message to the sender of the current message saying
"no such port".
TCPSER:
* FLSFMB - routine to delete an FMB chain.
* IMPUUO - provides ability for the user to initiate IMP connections
under program control.
* SETURG - set up TCP data to send an URG message next time out.
* TCPCHK - subroutine to do various once a second checks to an IMP DDB.
* TCPICK - check a connection to see if it is in a state where input is legal.
* TCPIFN - check to see if this input stream has received a legitimate
FIN. called after data is exhausted to see if there's any more data
coming or if this is EOF. if we have received a FIN for this
connection, close it now.
* TCPIN - process incoming TCP message.
* TCPMAK - put TCP leader (in 32 bit format) into fixed TCP output leader
buffer. then link the buffer to the beginning of the current output
stream. then send the message down to the next level of protocol for
further processing.
* TCPOCK - check a connection to see if it is in a state where output
is legal.
* TCPWUP - update a window if the user has read some of the data waiting.
IMPSER:
* ALCNEW - subroutine to handle wake up after allocation has increased.
D DEVxxx - fields in IMPDDB (xxx one of: NAM, CHR, IOS, SER, MOD, LOG,
BUF, IAD, OAD, STS, STA, XTR, EVM, PSI, ESE, HCW, CPU, JOB, CTR)
* FIXRTQ - routine to take the host in T1 and make all entries in the
retransmission queue use that host.
* GO1822 - subroutine to check to see that a host is good and, if so,
send the message.
D IBFHLT - -1 if buffer still needed
* IMPAIO - routine called at clock level to continue processing
non-blocking IMP output.
* IMPATT - routine to set the job number into the right IMP DDB when
initiating a job from an IMP TTY or when an IMP TTY attaches to an
existing job.
D IMPDDB - prototype IMP DDB
* IMPDEV - subroutine to determine if a DDB is that of an IMP and whether
or not it is controlling a job through an ITY.
* IMPDSP - dispatch table
* IMPEIM - here at interrupt level upon receipt of the end of a message.
* IMPEOM - here at interrupt level when end-of-message has been sent.
* IMPIN - here at interrupt level on first input interrupt
* IMPIND - here on blki runout at interrupt level.
* IMPISR - table of interrupt service routines
* IMPMAK - prepare a message for output to the IMP by converting it to 36
bit buffers from 32 bit buffers and adding the 1822 leader to it.
after it's all ready, we put it in the queues for transmission and
retransmission if necessary.
* IMPNEW - subroutine to tell the input code about new data.
* IMPOND - here on blko runout at interrupt level.
* IMPRES - routine to clean up all IMP DDBs (clear IOS flags, etc.)
assigned to this job.
* IMPSEC - here every second to check things
* IMPTIK - routine called by CLOCK1 on any clock tick during which IMPRQF
is set, to perform requested IMP processing.
* IMPTTY - subroutine to set up a crosspatch between an IMP DDB and a local
teletype.
* IMPUP - -1 if want the IMP system up
* IMPW60, IMPWAT - routine to wait for interrupt activity.
* IMPWAK - routine to wake the job at interrupt level
* IMPWK1 - routine to clear all wait flags and reset the timeout counter
to infinity
* INBYTE - get the next byte from the given DDB's input byte stream.
* INON - here from NETSUB when a buffer is again free.
* ITYGET - subroutine to allocate a line number for IMPs connecting
to a local process.
* ITYREL - subroutine to release an ITY.
* ITYSTO - here from clock tick level to start processing queued output
to ITY's.
* MICIMP - see if crosspatched line can take more
* OKFLAG - -1 if IMP is useable
* OUTGO1 - subroutine to start up output
* RQIITI, RQIITO, RQTIIO, RQTOIO - routines to request IMP processing
at clock level.
* SNDMSG - subroutine to queue a TCP message for output from interrupt level.
D STOPFL - -1 if IMP going down
D TELTAB - this is the mapping table from TTY chars to telnet commands,
used by NETQUO in SCNSER.
* TTIDET - routine to detach a crosspatched TTY from its controlled IMP DDB.
* TTYTST - subroutine to test for a teletype connection.
* TTYURG - subroutine to appropriately tweak everybody when an URG comes in
through TCP.
* XMTQIT - routine called by SCNSER transmit interrupt code for an IMP line
when there are no more characters to transmit (i.e. the line becomes
'idle').
NETSUB (lots of data word internals not shown here):
* BIBCHK - BIB consistency check
* BUFGET - subroutine to allocate a buffer.
* BUFREL - subroutine to release a buffer.
* CLRIMP - subroutine to wipe a DDB.
* CSMBYT - deal with a single byte for checksumming purposes.
* CSMHWD - deal with a 16 bit byte for checksumming purposes.
* CSMWDS - deal with 32 bit words for checksumming purposes.
* CSMWRD - deal with a 32 bit word for checksumming purposes.
* DDBDEA - subroutine to release a DDB.
* DDBFLS - flush all data from a DDB.
* DDBGET - finds a DDB for this job.
* DDBREL - subroutine to release a DDB.
* FLSBIB - flush a stream of BIBs link through their retransmission
queue links.
* FNDDDB - scan through all the IMP DDBs to find one that matches
the given values.
* GETLED - copies a leader into a preassigned storage location.
* GETMES - pull in a message stream from IMP input, tacking it on to the
end of a possibly nonexistent stream.
* MAKBIB - make a buffer information block for the current output buffer.
* MILTIM - return milliseconds since midnight
* NXTBYT - subroutine to read the next byte from a data stream.
* NXTFLS - skip over bytes in the data stream described by P1, P2, and P3.
* NXTWRD - read in a full 32-bit word from the data stream described by
P1, P2, and P3.
* OPTFLS - flush an option (IP or TCP, for example) from the data stream
described by P1, P2, and P3.
* RELBIB, ARLBIB - flush a BIB and everything that has anything to do with it.
* RELBUF - subroutine to release all buffers in a stream
* RPLWRD - replace the next full 32-bit word from the data stream described
by P1, P2, and P3 by the value passed in in T1.
* SKPBYT - find the location of the Nth byte in a buffer stream.
Data structures.
IPSER:
FDB - fragmentation data block: block containing data to allow a
fragmented message to be reassembled.